import Layouts from "@/layouts/index.vue"

export default {
    basePage: [
        {
            path: "",
            component: Layouts,
            redirect: "/index",
            hidden: true,
            children: [
                {
                    path: "index",
                    component: () => import("@/views/server/home/index.vue"),
                    name: "Index",
                    meta: {title: "首页", icon: "dashboard", affix: true},
                },
            ],
        },
        {
            path: '/redirect',
            component: Layouts,
            hidden: true,
            children: [
                {
                    path: '/redirect/:path(.*)',
                    component: () => import('@/views/common/redirect/redirect.vue')
                }
            ]
        },
        {
            path: '/user',
            component: Layouts,
            hidden: true,
            redirect: 'noredirect',
            children: [
                {
                    path: 'profile',
                    component: () => import('@/views/common/permission/user/info/index.vue'),
                    name: 'Profile',
                    meta: {title: '个人中心', icon: 'user'}
                }
            ]
        },
        {
            path: "/login",
            component: () => import("@/views/common/login/index.vue"),
            name: "login",
        },
        {
            path: "/404",
            component: () => import("@/views/common/error/404.vue"),
            hidden: true,
        },
        {
            path: "/401",
            component: () => import("@/views/common/error/401.vue"),
            hidden: true,
        },
        {
            path: "/test",
            component: () => import("@/views/server/test/test.vue"),
        },
    ],
    dynamicPage: [
        {
            path: '/common/permission/role-auth',
            component: Layouts,
            hidden: true,
            permissions: ['permission:role:edit'],
            children: [
                {
                    path: 'user/:roleId(\\d+)',
                    component: () => import('@/views/common/permission/role/authUser.vue'),
                    name: 'AuthUser',
                    meta: {title: '分配用户', activeMenu: '/permission/role'}
                }
            ]
        },
        {
            path: '/common/system/job/job-log',
            component: Layouts,
            hidden: true,
            permissions: ['system:job:list'],
            children: [
                {
                    path: 'index',
                    component: () => import('@/views/common/system/job/log.vue'),
                    name: 'JobLog',
                    meta: {title: '调度日志', activeMenu: '/common/system/job'}
                }
            ]
        }
    ],
}
